package com.yunyi.web.controller.qiao;

import com.yunyi.common.core.controller.BaseController;
import com.yunyi.common.core.domain.AjaxResult;
import com.yunyi.common.core.page.TableDataInfo;
import com.yunyi.system.domain.EmrCase;
import com.yunyi.system.service.EmrCaseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author stephen
 * @Date 2023/8/28 15:03
 * @ClassName: 诊断信息 处理操作
 * @Description: TODO
 * @Version 1.0
 */
@RestController
@RequestMapping("/qiao/emr/case")
@Api(tags = "诊断信息控制器")
public class EmrCaseController2 extends BaseController {

    @Autowired
    private EmrCaseService emrCaseService2;



    @ApiOperation(value = "条件分页查询诊断信息")
    @GetMapping("/list")
    public TableDataInfo list(EmrCase emrCase2){
        startPage();
        List<EmrCase> emrCase2s = emrCaseService2.selectEmrCaseList(emrCase2);
        return getDataTable(emrCase2s);
    }

    @ApiOperation(value = "根据Id查询会诊病例就诊人详细信息")
    @PreAuthorize("@ss.hasPermi('qiao:emr:quert')")
    @GetMapping("/id")
    public AjaxResult selEmrCaseById(@PathVariable Long id){
       return success(emrCaseService2.selectEmrCaseById(id));
    }
}
